<%@ page contentType="text/html; charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
  <title>修改宠物信息</title>
</head>
<body>
<link rel="stylesheet" type="text/css" href="../style/header.css"/>
<%@ include file="../common/header.jsp" %>
<div class="form-container">
  <h2>修改宠物信息</h2>
  <p>宠物 ID: ${param.id}</p>
  <p>宠物 ID: ${pet.id}</p>
  <p>宠物 ID: ${petItem.id}</p>
  <form action="updatePet.pet" method="post">
    <input type="hidden" name="id" value="${param.id}" />

    <label for="avatar">宠物头像：</label>
    <input type="file" name="avatar" id="avatar" accept="image/*"/>

    <label for="name">宠物名称：</label>
    <input type="text" name="name" id="name" placeholder="请输入宠物名字"/>

    <label for="species">种类：</label>
    <input type="text" name="species" id="species" placeholder="例如：狗、猫"/>

    <label for="birthday">生日：</label>
    <input type="date" name="birthday" id="birthday"/>

    <label for="gender">性别：</label>
    <select name="gender" id="gender">
      <option value="1">雄性</option>
      <option value="2">雌性</option>
      <option value="0">未知</option>
    </select>

    <label for="isPublic">是否公开：</label>
    <select name="isPublic" id="isPublic">
      <option value="1">公开</option>
      <option value="0">私有</option>
    </select>

    <button type="submit" class="btn-submit">提交</button>
  </form>
</div>
</body>
<style>
  body {
    font-family: "Segoe UI", sans-serif;
    padding: 30px;
    background-color: #f7f9fc;
  }

  .form-container {
    max-width: 600px;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  }

  h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
  }

  label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
  }

  input, select {
    width: 100%;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
  }
  h1 {
    text-align: center;
    color: #333;
  }
  .form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: #f9f9f9;
  }
  label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
  }
  input[type="text"],
  input[type="date"],
  select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
  }
  input[type="file"] {
    margin-top: 5px;
  }
  .btn-submit {
    margin-top: 25px;
    padding: 10px 20px;
    background-color: #4CAF50;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
  }
  .btn-submit:hover {
    background-color: #45a049;
  }
</style>
</html>
